package com.bmw.seed.controller;

import com.bmw.seed.model.UserInfo;
import com.bmw.seed.service.UserInfoService;
import com.bmw.seed.util.bean.BaseResponse;
import com.bmw.seed.util.bean.CursorPageReq;
import com.bmw.seed.util.bean.CursorPageResp;
import com.bmw.seed.util.bean.PageResp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Classname: UserInfoController
 * Package: com.bmw.seed.controller
 * Description:
 *
 * @Author 王少伟
 * @Create 2024/1/29 17:49
 * @Version 1.8
 */
@RestController
@Slf4j
public class UserInfoController {
    @Autowired
    UserInfoService userInfoService;
    /**
     * 游标分页
     */
    @RequestMapping(value = "/cursor/page")
    public BaseResponse<CursorPageResp<UserInfo>> cursorPage(@Valid @RequestBody CursorPageReq req){
        return BaseResponse.ok(userInfoService.cursorPage(req));
    }
}
